package com.cn.service.salary;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cn.dao.salary.TbSalaryDao;
import com.cn.entity.TbSalary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author qingtian
 * @create 2021-06-03 20:14
 * @
 */
@Service
public class TbSalaryServiceImpl implements TbSalaryService{
    @Autowired
    private TbSalaryDao tbSalaryDao;

    /**
     *
     * @return
     */
//    @Override
//    public List<TbSalary> selectAll() {
//        return tbSalaryDao.selectList(null);
//    }

    @Override
    public TbSalary selectById(Long id) {
        return tbSalaryDao.selectById(id);
    }

    @Override
    public Page<TbSalary> selectAll(Page<TbSalary> page, String name, String idCard) {
        return tbSalaryDao.selectAll(page,name,idCard);
    }

    @Override
    public int updateSalary(TbSalary tbSalary) {
        return tbSalaryDao.updateById(tbSalary);
    }


//    @Override
//    public List<TbSalary> selectByIdCardAndPayCard(@Param("idCard")String idCard, @Param("payCard") String payCard) {
//        QueryWrapper<TbSalary> queryWrapper = new QueryWrapper();
//        queryWrapper.ne("idCard",idCard)
//                .ne("payCard",payCard);
//        List list1 = tbSalaryDao.selectList(queryWrapper);
//        Map map = new HashMap();
//        map.put("idCard",idCard);
//        map.put("payCard",payCard);
//        List list = tbSalaryDao.selectByMap(map);
//        return list1;
//    }


}
